﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using QuizService.beans;

namespace QuizService
{
    [ServiceContract]
    interface IQuizService
    {
        [OperationContract]
        string GetData(int value);
        [OperationContract]
        bool RegisterUser(user r);
        [OperationContract]
        bool LogInUser(user r);
        [OperationContract]
        bool ModifyUser(user u);
        [OperationContract]
        question getRandomQuestion(genre g);
        [OperationContract]
        bool addQuestion(question q);
        [OperationContract]
        bool delQuestion(question q);
        [OperationContract]
        IEnumerable<question> getAllQuestions(genre g);
        [OperationContract]
        user getSender(int id);
        [OperationContract]
        genre getGenre(int id);
        [OperationContract]
        IEnumerable<genre> getAllGenres();
        [OperationContract]
        bool modifyQuestion(question q);
        [OperationContract]
        bool isAdmin(user r);
        [OperationContract]
        bool doAdmin(user r);
        [OperationContract]
        bool delAdmin(user r);
        [OperationContract]
        bool delUser(user r);
        [OperationContract]
        bool addGenre(genre g);
        [OperationContract]
        bool modifyGenre(genre g);
        [OperationContract]
        bool delGenre(genre g);
        [OperationContract]
        bool addMatch(match m);
        [OperationContract]
        double countPoints(user r);
        [OperationContract]
        int countPlayedQuestions(user r);
        [OperationContract]
        IEnumerable<toplist> getToplist();
        [OperationContract]
        bool delMatch(match m);
        [OperationContract]
        IEnumerable<match> getAllMatches();
        [OperationContract]
        IEnumerable<match> getuserAllMatches(user r);
        [OperationContract]
        IEnumerable<user> getAllUsers();
        [OperationContract]
        question getQuestionbyId(int id);
        [OperationContract]
        match getMatchbyId(int id);
    }
}
